<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('物料')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-material_id" data-rule="required" class="form-control selectpicker" name="row[material_id]" data-live-search="true">
                <option value="">{:__('请选择物料')}</option>
                {foreach $materialList as $material}
                <option value="{$material.id}">{$material.material_name} ({$material.material_code}) - {$material.category.name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('仓库')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-warehouse_id" data-rule="required" class="form-control selectpicker" name="row[warehouse_id]" data-live-search="true">
                <option value="">{:__('请选择仓库')}</option>
                {foreach $warehouseList as $warehouse}
                <option value="{$warehouse.id}">{$warehouse.warehouse_name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('库存数量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quantity" data-rule="required" class="form-control" name="row[quantity]" type="number" value="0" min="0" step="0.01">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control" name="row[remark]" rows="3"></textarea>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
